﻿@model LogOnViewModel

<div id="login">
    @using (Html.BeginForm("LogIn", 
                           "User",
                           new {returnUrl = Request.QueryString["ReturnUrl"]},
                           FormMethod.Post, 
                           new { @id = "openid_form" }))
    {
        <input type="hidden" name="action" value="verify" />
        <fieldset>
            <legend>Sign-in or create new account</legend>
            @if (Model.ErrorMessage.IsNotNullOrEmpty())
            {
                <div class="error">
                    @Model.ErrorMessage
                </div>
            }
            <div id="openid_choice">
                <p>Please click your account provider:</p>
                <div id="openid_btns"></div>
            </div>
            <div id="openid_input_area">
                @Html.TextBoxFor(x => x.ProviderName, new{@value = "http://", @id = "openid_identifier"})
                <input id="openid_submit" type="submit" value="Sign-In" />
            </div>
            <noscript>
                <p>
                    OpenID is service that allows you to log-on to many different websites
                    using a single indentity. Find out <a href="http://openid.net/what/">more about OpenID</a>
                    and <a href="http://openid.net/get/">how to get an OpenID enabled account</a>.
                </p>
            </noscript>
        </fieldset>
    }

    @Styles.Render("~/content/css/openid")
    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
        @Scripts.Render("~/bundles/openid")
        <script type="text/javascript">
            $(function () {
                openid.init('openid_identifier');
            });
        </script>
    }
</div>